package acwing;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing.QuestionsPractice
 * @File : Q4941.java
 * @Author : WangRuoyu
 * @Date : 2023/4/2 19:01
 */

import java.io.*;

public class Q4941 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");
        int x = Integer.parseInt(words[0]);
        int res = 0;
        while (x != 0) {
            res += (x & 1);
            x >>= 1;
        }
        System.out.println(res);
    }
}
